import textPic from '../../imgs/text.png'
export default {
    tab: 'basic',
    type: 'static',
    name: 'Text',
    title: '文字组件',
    pic: textPic,
    width: 100,
    height: 30,
    data: {
        props: {
            children: {
                title: '文本',
                valueType: 'input',
                initialValue: '文本',
            },
            color: {
                title: '文字颜色',
                valueType: 'color',
                initialValue: 'black',
            },
            backgroundColor: {
                title: '文字背景色',
                valueType: 'color',
                initialValue: '#ffffff00',
            },
            fontSize: {
                title: '字号',
                valueType: 'digit',
                initialValue: '18',
            },
            textAlign: {
                title: '水平对齐',
                valueType: 'radioButton',
                initialValue: 'center',
                valueEnum: {
                    unset: { text: '不设置' },
                    left: { text: '左' },
                    center: { text: '中' },
                    right: { text: '右' },
                },
                // 上下布局， 默认为左右布局
                formItemProps: {
                    labelCol: { span: 24 },
                    wrapperCol: { span: 24} 
                }
            },
            fontFamily: {
                title: '字体',
                valueType: 'select',
                initialValue: '宋体',
                valueEnum: {
                    '宋体': '宋体',
                    '黑体': '黑体',
                    '微软雅黑': '微软雅黑',
                }
            },
            fontWeight: {
                title: '字体加粗',
                valueType: 'switch',
                initialValue: false,
            },
            textIndent: {
                title: '字体缩进',
                valueType: 'digit',
                initialValue: 0,
            },
            lineHeight: {
                title: '行高(px)',
                valueType: 'digit',
                initialValue: 30,
            },
            lineClamp: {
                title: '多行省略',
                valueType: 'digit',
                initialValue: 0,
            },
            textDecorationLine: {
                title: '文字修饰线',
                valueType: 'select',
                initialValue: 'none',
                valueEnum: {
                    'none': '不设置',
                    'underline': '下划线',
                    'overline': '上划线',
                    'line-through': '删除线',
                }
            },
        }
    },
}